<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 只要是达到某个条件就会返回一个新的数组
        // var arr = [3,4,5,6]
        // var res = arr.filter(item=>{
        //     return item>4;
        // })
        // console.log(res)
        var students = [
            {name:"李四",age:"18岁"},
            {name:"李二",age:"11岁"},
            {name:"李三",age:"19岁"},
            {name:"李五",age:"22.5岁"},

        ]
        var res = students.filter(item=>{
            var age = parseInt(item.age);
            return age>11;
        })
        console.log(res)
    </script>
</body>
</html>